<?php   // $Id: logout.php 208 2008-06-08 12:10:30Z pcoustillas $ ?>
<?php
/*Copyright (C) 2003-2004 Guy Hendrickx
Licensed under the terms of the GNU  General Public License:http://www.opensource.org/licenses/gpl-license.php
File Authors:Guy Hendrickx 
Modif : Pierre Coustillas */

 
ini_set('session.save_path', dirname(__FILE__) . '/sessions');

session_start();

setcookie("PHPSESSID",'', time()-42000, '/');

session_unset();
session_destroy();


//Efface les fichiers de session 
/*
$dir = "sessions" ;
$t=time();
$h=opendir($dir);
while($file=readdir($h))
{
	if(substr($file,0,4)=='sess')
	{
		$path=$dir.'/'.$file;
		if($t-filemtime($path)>3)
			@unlink($path);
	}
}
closedir($h);
*/


header("Location: index.php?admin=oui");

?>